<? if (!defined("BASEPATH")) exit("No direct script access allowed"); ?>

	<script type="text/javascript">
		function jsValidation() {
			var error = '';
			if($('#subject').val() == 0) {
				error += '<?=$this->db->escape_str($this->lang->line("SUBJECT_IS_REQUIRED"))?>\n';
			}
			if($('#message').val() == '' || $('#message').attr('placeholder') == $('#message').val()) {
				error += '<?=$this->db->escape_str($this->lang->line("TEXT_OF_THE_MESSAGE_IS_REQUIRED"))?>\n';
			}
			if(error != '') {
				alert(error);
				return false;
			}
			return true;
		}
	</script>

	<?=form_open("messages", array("onsubmit" => "if(!jsValidation()) return false;"))?>
		<? /*<input type="text" class="data" id="fullname" placeholder="<?=$this->lang->line("YOUR_NAME")?>" value=""><br> */ ?>
		<? /*<input type="text" class="data" id="email" placeholder="<?=$this->lang->line("YOUR_EMAIL")?>" value=""><br> */ ?>
		<? /*<input type="text" class="data" id="subject" placeholder="<?=$this->lang->line("SUBJECT")?>" value=""><br> */ ?>
		<select class="w100 data" id="subject" name="subject" style="width:250px; max-width:250px; min-width:250px;">
			<option value="0"><?=$this->lang->line("PLEASE_CHOOSE_SUBJECT")?></option>
			<option value="<?=$this->db->escape_str($this->lang->line("APPLICATION"))?>"><?=$this->lang->line("APPLICATION")?></option>
			<option value="<?=$this->db->escape_str($this->lang->line("FEE"))?>"><?=$this->lang->line("FEE")?></option>
			<option value="<?=$this->db->escape_str($this->lang->line("SCHOLARSHIP"))?>"><?=$this->lang->line("SCHOLARSHIP")?></option>
			<option value="<?=$this->db->escape_str($this->lang->line("OTHER"))?>"><?=$this->lang->line("OTHER")?></option>
		</select><br>
		<textarea class="data w100" name="message" id="message" placeholder="<?=$this->lang->line("MESSAGE")?>"></textarea><br>
		<?=form_hidden("insId", $insId)?>
		<input type="submit" class="button" value="<?=$this->lang->line("SEND")?>">
	<?=form_close()?>
	<br/><br/>